package org.example.basic.functionclass;



import org.example.basic.entity.UserEntity;
import org.example.basic.entity.UserEntityList;
import org.example.basic.util.FunctionUtil;

import java.util.List;


/**
 * Function 练习
 *
 * @author songyafei
 */
public class FunctionTest1 {
    public static void main(String[] args) {
        List<UserEntity> userEntityList = UserEntityList.getList();


        List<Integer> map = FunctionUtil.map(userEntityList, (UserEntity u) -> u.getAge());
        List<String> map1 = FunctionUtil.map(userEntityList, (UserEntity u) ->"姓名：" +u.getName() +",年龄："+u.getAge());
        System.out.println(map.size());
        System.out.println(map1.size());

        

    }
}
